<?php
class TweetsController extends AppController {
	var $name = 'Tweets';
	
	// 使うコンポーネントに Twitterを加えます
	var $components = array('Twitter');
	
	function index() {
		if ($this->data) {
			$d = $this->data['Tweets'];
			$ret = $this->Twitter->tweet($d['username'], $d['password'], $d['message']);
			$this->set('username', $d['username']);
			$this->set('success', $ret);
		}
	}
}
?>
